﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="people"
    targetNamespace="http://tempuri.org/"
    elementFormDefault="qualified"
    xmlns="http://tempuri.org/"
    xmlns:mstns="http://tempuri.org/People.xsd"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
>
  <xs:element name ="people">
    <xs:complexType>
      <xs:group ref="PersonItemGroup" minOccurs="1" maxOccurs="unbounded">
      </xs:group>      
    </xs:complexType>
  </xs:element>
  <xs:group name="PersonItemGroup">
    <xs:sequence>
    <xs:element name="person">
      <xs:complexType>
        <xs:sequence>
          <xs:element name="firstname" type="xs:string"></xs:element>
          <xs:element name="lastname" type="xs:string"></xs:element>
        </xs:sequence>
        <xs:attribute name="age" type="xs:integer" use="optional"></xs:attribute>
      </xs:complexType>
    </xs:element>
    </xs:sequence>
  </xs:group>
</xs:schema>
